package com.cskaoyan.order.utils;

import com.alibaba.fastjson.JSON;
import com.cskaoyan.bean.Userinfo;

import javax.servlet.http.HttpServletRequest;

/**
 * @ClassName UserUtil
 * @Description TODO
 * @Author zhangdongdong
 * @Date 2022/9/20 22:41
 * @Version 1.0
 */
public class UserUtil {

    public static Userinfo getUserInfo(HttpServletRequest request) {
        String user_info = request.getHeader("user_info");
        Userinfo userinfo = JSON.parseObject(user_info, Userinfo.class);
        return userinfo;
    }
}
